package com.kt

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.view.View
import com.jh.ios.forecast.R
import kotlinx.android.synthetic.main.acitvity_logo_app.*
import kotlinx.android.synthetic.main.navigation_bar.*
import org.jetbrains.anko.intentFor

/**
 * 登录
 */
class LoginActivity:AppCompatActivity(), View.OnClickListener {


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.acitvity_logo_app)
        titelW(this, window)
        init1()
        initEvent1()
    }

    private fun init1() {
        navigation_title.text = "会员登录"
        back_buton.visibility= View.VISIBLE
        back_buton.setOnClickListener(this)
        login_button.setOnClickListener(this)
        register_button.setOnClickListener(this)
        tv_forget_pass.setOnClickListener(this)
    }

    private fun initEvent1() {

    }

    override fun onClick(v: View?) {
        when(v){
            back_buton->{  //返回
                finish()
            }
            login_button->{  //登录

            }
            register_button->{   //注册
                startActivity(intentFor<RegisterActivity>())
            }
            tv_forget_pass->{   //忘记密码
                startActivity(intentFor<ForgetPasswordActivity>())
            }
        }
    }
}